﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FantastPlatform.Framework.Core
{
    /// <summary>
    /// 树形结构
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface INode<IEntity>:IItem
    {
        /// <summary>
        /// 父节点
        /// </summary>
        /// <returns></returns>
        IEntity Parent { set; get; }
        /// <summary>
        /// 子节点
        /// </summary>
        /// <returns></returns>
        IList<IEntity> Children { get; set; }
        /// <summary>
        /// 层级
        /// </summary>
        int Level { get; set; }
        /// <summary>
        /// 是否最末级
        /// </summary>
        bool Leaf { get; set; }
    }
}
